From c30fc92b3e1030394a287d8dec5a8c4ec015ca46 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Thu, 28 Mar 2019 19:28:05 -0400 Subject: [PATCH] builder-tool: Don't strip the xml declaration This is useful for interoperability with other tools. --- gtk/tools/gtk-builder-tool-simplify.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/gtk/tools/gtk-builder-tool-simplify.c b/gtk/tools/gtk-builder-tool-simplify.c index 2c7f4e52cf..44f5f59e53 100644 --- a/gtk/tools/gtk-builder-tool-simplify.c +++ b/gtk/tools/gtk-builder-tool-simplify.c @@ -1264,9 +1264,16 @@ dump_element (Element *element, g_fprintf (output, "/>\n"); } +static void +write_xml_declaration (FILE *output) +{ + g_fprintf (output, "\n"); +} + static void dump_tree (MyParserData *data) { + write_xml_declaration (data->output); dump_element (data->root, data->output, 0); } -- 2.30.2